.task-sidebar.collapsed {
	width: 48px;
	overflow: hidden;
}

.panel-toggle-btn {
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 4px;
	cursor: pointer;
	opacity: 0.6;

	transition: opacity 0.2s ease;
}

.panel-toggle-btn:hover {
	opacity: 1;
}

.task-sidebar.collapsed .sidebar-nav {
	align-items: center;
}

/* Sidebar Navigation */
.sidebar-nav {
	display: flex;
	flex-direction: column;
	padding: 20px 0 10px 0;
	gap: 5px;
}

.sidebar-nav-spacer {
	height: 1px;
	background-color: var(--background-modifier-border);
	margin: 8px 15px;
	opacity: 0.7;
	margin-top: auto;
}

.sidebar-nav-item {
	display: flex;
	align-items: center;
	padding: 8px 15px;
	cursor: pointer;
	border-radius: 4px;
	margin: 0 5px;
	transition: background-color 0.2s ease;
}

.sidebar-nav-item:hover {
	background-color: var(--background-modifier-active);
}

.sidebar-nav-item.is-active {
	font-weight: 600;
	--background-modifier-hover: var(--interactive-accent);
	--icon-color: var(--text-on-accent);
	background-color: var(--interactive-accent);
	color: var(--text-on-accent);
}

.nav-item-icon {
	--icon-size: var(--size-4-4);
	display: flex;
	align-items: center;
	justify-content: center;
	margin-right: var(--size-4-2);
}

.nav-item-label {
	flex: 1;
	font-size: var(--font-ui-medium);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.nav-item-label.hidden {
	opacity: 0;
	width: 0;
	overflow: hidden;
	margin: 0;
}

.task-sidebar.collapsed .sidebar-nav-item {
	padding: 8px 10px;
	justify-content: center;
	width: var(--size-4-9);
	flex-shrink: 0;

	transition: width 0.3s ease-in-out, flex-shrink 0.3s ease-in-out;
}

.task-sidebar.collapsed .nav-item-icon {
	margin-right: 0;
}

/* Content Styles */
.task-content {
	flex: 1;
	display: flex;
	flex-direction: column;
	overflow: hidden;
	min-width: 0;
	transition: margin 0.3s ease;
}

.task-sidebar.collapsed .task-content {
	margin-left: -200px;

	transition: margin 0.3s ease;
}

/* Project Tree */
.task-genius-view .project-tree {
	padding: 10px 0;
	transition: opacity 0.3s ease;
}

.task-genius-view .tree-root {
	display: flex;
	flex-direction: column;
}

.task-genius-view .task-genius-view .tree-item {
	display: flex;
	align-items: center;
	padding: 6px 8px;
	cursor: pointer;
	transition: background-color 0.2s ease;
	border-radius: 4px;
	margin: 0 5px;
}

.task-genius-view .tree-item:hover {
	background-color: var(--background-modifier-border-hover);
}

.task-genius-view .tree-item.selected {
	background-color: var(--background-modifier-border-hover);
}

.task-genius-view .tree-item-icon {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 20px;
	height: 20px;
	margin-right: 8px;
	color: var(--text-muted);
}

.task-genius-view .tree-item-name {
	flex: 1;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.task-genius-view .tree-item-count {
	font-size: 0.8em;
	color: var(--text-muted);
	margin-left: 5px;
	background-color: var(--background-modifier-hover);
	padding: 1px 6px;
	border-radius: 10px;
}

.task-genius-view .tree-item-toggle,
.task-genius-view .tree-item-indent {
	width: 20px;
	display: flex;
	align-items: center;
	justify-content: center;
	margin-right: 5px;
}

.task-genius-view .tree-item-toggle {
	cursor: pointer;
}

/* Content Header */
.content-header {
	padding: 15px;
	border-bottom: 1px solid var(--background-modifier-border);
	display: flex;
	align-items: center;
	flex-shrink: 0;
}

.task-count {
	font-size: 0.8em;
	color: var(--text-muted);
	margin-right: 10px;
}

.focus-filter {
	margin-left: 10px;
}

/* TaskView - OmniFocus Style */

.workspace-leaf-content .task-genius-view {
	padding: 0;
}

/* Main container layout */
.task-genius-container {
	display: flex;
	flex-direction: row;
	height: 100%;
	width: 100%;
	background-color: var(--background-primary);
	border-top: 1px solid var(--background-modifier-border);
	color: var(--text-normal);

	position: relative;
	overflow: hidden;
}

/* Left sidebar */
.task-sidebar {
	display: flex;
	flex-direction: column;
	border-right: 1px solid var(--background-modifier-border);
	background-color: var(--background-secondary);
	overflow-y: auto;

	width: 240px;
	transition: width 0.3s ease-in-out;
	position: relative;
}

/* Main content area */
.task-content {
	display: flex;
	flex-direction: column;
	flex: 1;
	min-width: 300px;
	height: 100%;
	overflow: hidden;
}

/* Navigation sidebar */
.task-sidebar .sidebar-nav {
	display: flex;
	flex-direction: column;
	padding: 8px 0;
	height: 100%;
}

/* Project tree */
.project-tree {
	display: flex;
	flex-direction: column;
	padding: 8px 0;
	overflow-y: auto;
}

.tree-root {
	display: flex;
	flex-direction: column;
}

.task-genius-view .tree-item {
	display: flex;
	align-items: center;
	padding: 4px 12px;
	cursor: pointer;
	border-radius: 4px;
	margin: 2px 8px;
}

.task-genius-view .tree-item:hover {
	background-color: var(--background-modifier-border-hover);
}

.task-genius-view .tree-item.selected {
	background-color: var(--background-modifier-border-hover);
	color: var(--text-accent);
}

.task-genius-view .tree-item-toggle {
	width: 16px;
	height: 16px;
	display: flex;
	align-items: center;
	justify-content: center;
	margin-right: 4px;
}

.task-genius-view .tree-item-indent {
	width: 16px;
	height: 16px;
	margin-right: 4px;
}

.task-genius-view .tree-item-icon {
	margin-right: 8px;
	width: 16px;
	height: 16px;
	display: flex;
	align-items: center;
	justify-content: center;
	color: var(--text-muted);
}

.task-genius-view .tree-item-name {
	flex: 1;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.task-genius-view .tree-item-count {
	font-size: 0.8em;
	color: var(--text-muted);
	background-color: var(--background-modifier-hover);
	border-radius: 10px;
	padding: 2px 6px;
	min-width: 16px;
	text-align: center;
}

.task-genius-view .tree-item.expanded > .tree-item-children {
	display: flex;
}

.task-genius-view .tree-item-children {
	display: none;
	flex-direction: column;
	margin-left: 16px;
	width: 100%;
}

/* Content header */
.task-genius-view .content-header {
	display: flex;
	align-items: center;
	padding: 10px 16px;
	border-bottom: 1px solid var(--background-modifier-border);
	min-height: 50px;
}

.task-genius-view .content-title {
	font-size: 1.2em;
	font-weight: 600;
	margin-right: 12px;
	flex: 1;
}

@media screen and (max-width: 768px) {
	.task-genius-view .content-title {
		display: none;
	}

	.task-genius-view .task-count {
		flex: 1;
	}

	.task-genius-view .focus-filter {
		flex: 1;
	}
}

.task-genius-view .content-filter {
	display: flex;
	align-items: center;
	margin-right: 12px;
}

.task-genius-view .filter-input {
	border: 1px solid var(--background-modifier-border);
	border-radius: 4px;
	padding: 4px 8px;
	width: 200px;
	background-color: var(--background-primary);
}

.task-genius-view .focus-button {
	background-color: var(--interactive-normal);
	border: 1px solid var(--background-modifier-border);
	border-radius: 4px;
	padding: 4px 10px;
	color: var(--text-normal);
	cursor: pointer;
}

.task-genius-view .focus-button:hover {
	background-color: var(--interactive-hover);
}

.task-genius-view .focus-button.focused {
	background-color: var(--interactive-accent);
	color: var(--text-on-accent);
}

.mod-root .task-genius-action-btn {
	--icon-size: 16px;
}

.mod-left-split .task-genius-action-btn {
	display: none;
}

.mod-left-split
	.workspace-tab-header-status-container:has(.task-genius-action-btn) {
	display: none;
}

.mod-right-split
	.workspace-tab-header-status-container:has(.task-genius-action-btn) {
	display: none;
}

.task-genius-view .task-empty-state {
	width: 100%;
	height: 100%;
	flex: 1;
	display: flex;
	align-items: center;
	justify-content: center;
}

.mod-root .task-genius-tab-header {
	container-type: inline-size !important;
}

@container (max-width: 120px) {
	.mod-root .task-genius-action-btn {
		display: none;
	}
}

/* Workflow Quick Modal Styles */
.quick-workflow-modal {
	max-width: 600px;
	min-height: 400px;
}

.workflow-template-section {
	margin-bottom: 20px;
	padding: 15px;
	border: 1px solid var(--background-modifier-border);
	border-radius: 8px;
}

.template-description {
	margin-top: 10px;
}

.template-desc-text {
	font-style: italic;
	color: var(--text-muted);
	margin: 0;
}

.workflow-form-section {
	margin-bottom: 20px;
}

.workflow-stages-preview {
	margin-top: 15px;
}

.stages-preview-list {
	margin-top: 10px;
}

.stage-preview-item {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 8px 12px;
	margin: 4px 0;
	background: var(--background-secondary);
	border-radius: 6px;
	border: 1px solid var(--background-modifier-border);
}

.stage-info {
	display: flex;
	align-items: center;
	gap: 8px;
}

.stage-name {
	font-weight: 500;
}

.stage-type {
	color: var(--text-muted);
	font-size: 0.9em;
}

.stage-actions {
	display: flex;
	gap: 4px;
}

.no-stages-message {
	text-align: center;
	color: var(--text-muted);
	font-style: italic;
	padding: 20px;
	border: 2px dashed var(--background-modifier-border);
	border-radius: 8px;
	margin-top: 10px;
}

.workflow-modal-buttons {
	display: flex;
	justify-content: flex-end;
	gap: 10px;
	margin-top: 20px;
	padding-top: 15px;
	border-top: 1px solid var(--background-modifier-border);
}

/* Workflow Progress Indicator Styles */
.workflow-progress-indicator {
	background: var(--background-secondary);
	border: 1px solid var(--background-modifier-border);
	border-radius: 8px;
	padding: 15px;
	margin: 10px 0;
}

.workflow-progress-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 15px;
}

.workflow-name {
	font-weight: 600;
	font-size: 1.1em;
}

.workflow-progress-text {
	color: var(--text-muted);
	font-size: 0.9em;
}

.workflow-progress-bar-container {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-bottom: 15px;
}

.workflow-progress-bar {
	flex: 1;
	height: 8px;
	background: var(--background-modifier-border);
	border-radius: 4px;
	overflow: hidden;
}

.workflow-progress-fill {
	height: 100%;
	background: var(--interactive-accent);
	transition: width 0.3s ease;
}

.workflow-progress-percentage {
	font-size: 0.9em;
	font-weight: 500;
	min-width: 35px;
	text-align: right;
}

.workflow-stage-list {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.workflow-stage-item {
	display: flex;
	align-items: flex-start;
	gap: 12px;
	padding: 10px;
	border-radius: 6px;
	transition: background-color 0.2s ease;
}

.workflow-stage-item.completed {
	background: var(--background-modifier-success);
}

.workflow-stage-item.current {
	background: var(--background-modifier-accent);
	border: 1px solid var(--interactive-accent);
}

.workflow-stage-item.pending {
	background: var(--background-primary);
	opacity: 0.7;
}

.workflow-stage-icon {
	width: 20px;
	height: 20px;
	display: flex;
	align-items: center;
	justify-content: center;
	margin-top: 2px;
}

.workflow-stage-icon.completed-icon {
	color: var(--text-success);
}

.workflow-stage-icon.current-icon {
	color: var(--interactive-accent);
}

.workflow-stage-icon.pending-icon {
	color: var(--text-muted);
}

.workflow-stage-content {
	flex: 1;
}

.workflow-stage-name {
	font-weight: 500;
	margin-bottom: 2px;
}

.workflow-stage-type {
	font-size: 0.8em;
	color: var(--text-muted);
}

.workflow-stage-number {
	width: 24px;
	height: 24px;
	border-radius: 50%;
	background: var(--background-modifier-border);
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 0.8em;
	font-weight: 600;
	margin-top: 2px;
}

.workflow-stage-item.completed .workflow-stage-number {
	background: var(--text-success);
	color: var(--background-primary);
}

.workflow-stage-item.current .workflow-stage-number {
	background: var(--interactive-accent);
	color: var(--text-on-accent);
}

.workflow-substage-container {
	margin-top: 8px;
	padding-left: 16px;
	border-left: 2px solid var(--background-modifier-border);
}

.workflow-substage-item {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 4px 0;
}

.workflow-substage-icon {
	width: 12px;
	height: 12px;
	color: var(--text-muted);
}

.workflow-substage-name {
	font-size: 0.9em;
	color: var(--text-muted);
}
